package com.ruoyi.web.controller.miniapp;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.framework.config.ServerConfig;
import com.ruoyi.system.service.IMiniappService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/miniapp")
public class MiniappController extends BaseController {
    @Autowired
    private IMiniappService miniappService;

    @Autowired
    private ServerConfig serverConfig;

    @GetMapping("/{orderNo}")
    public AjaxResult qrcode(@PathVariable String orderNo)
    {
        return toAjax(  miniappService.CreateQRcode(orderNo,serverConfig.getUrl()));
    }


}
